package com.wardrobe.smartWardrobe.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author tky
 * @since 2024-03-24
 */
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long wechatOrder;

    private Integer userId;

    private Float totalPrice;

    /**
     * 订单类型：006000服装订单，006001会员订单，006002推广订单
     */
    private String type;

    /**
     * 订单状态:004000表示待支付,004001表示支付成功,004002表示支付失败,004003表示已退款
     */
    private String status;

    /**
     * 失败原因
     */
    private String errMsg;

    /**
     * 支付时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getWechatOrder() {
        return wechatOrder;
    }

    public void setWechatOrder(Long wechatOrder) {
        this.wechatOrder = wechatOrder;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Float getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Float totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Orders{" +
        "id=" + id +
        ", wechatOrder=" + wechatOrder +
        ", userId=" + userId +
        ", totalPrice=" + totalPrice +
        ", type=" + type +
        ", status=" + status +
        ", errMsg=" + errMsg +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
